.class public Lcom/jecelyin/common/utils/e;
.super Ljava/lang/Object;
.source "UIUtils.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/jecelyin/common/utils/e$e;,
        Lcom/jecelyin/common/utils/e$d;
    }
.end annotation


# direct methods
.method public static a(Landroid/content/Context;I)I
    .locals 1

    .line 43
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p0

    int-to-float p1, p1

    .line 44
    invoke-virtual {p0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object p0

    const/4 v0, 0x1

    invoke-static {v0, p1, p0}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result p0

    float-to-int p0, p0

    return p0
.end method

.method public static a(Landroid/view/View;)Landroid/app/Activity;
    .locals 1

    .line 38
    invoke-virtual {p0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object p0

    .line 39
    :goto_0
    instance-of v0, p0, Landroid/content/ContextWrapper;

    if-eqz v0, :cond_1

    .line 40
    instance-of v0, p0, Landroid/app/Activity;

    if-eqz v0, :cond_0

    .line 41
    check-cast p0, Landroid/app/Activity;

    return-object p0

    .line 42
    :cond_0
    check-cast p0, Landroid/content/ContextWrapper;

    invoke-virtual {p0}, Landroid/content/ContextWrapper;->getBaseContext()Landroid/content/Context;

    move-result-object p0

    goto :goto_0

    :cond_1
    const/4 p0, 0x0

    return-object p0
.end method

.method public static a(Landroid/content/Context;IILjava/lang/CharSequence;ILcom/jecelyin/common/utils/e$e;)V
    .locals 7
    .param p1    # I
        .annotation build Landroidx/annotation/StringRes;
        .end annotation
    .end param
    .param p2    # I
        .annotation build Landroidx/annotation/StringRes;
        .end annotation
    .end param

    const/4 v0, 0x0

    if-eqz p1, :cond_0

    .line 8
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    move-object v2, p1

    goto :goto_0

    :cond_0
    move-object v2, v0

    :goto_0
    if-eqz p2, :cond_1

    invoke-virtual {p0, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    :cond_1
    move-object v3, v0

    move-object v1, p0

    move-object v4, p3

    move v5, p4

    move-object v6, p5

    invoke-static/range {v1 .. v6}, Lcom/jecelyin/common/utils/e;->a(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILcom/jecelyin/common/utils/e$e;)V

    return-void
.end method

.method public static a(Landroid/content/Context;ILcom/jecelyin/common/utils/e$d;)V
    .locals 0
    .param p1    # I
        .annotation build Landroidx/annotation/StringRes;
        .end annotation
    .end param

    .line 25
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-static {p0, p1, p2}, Lcom/jecelyin/common/utils/e;->a(Landroid/content/Context;Ljava/lang/CharSequence;Lcom/jecelyin/common/utils/e$d;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/CharSequence;Lcom/jecelyin/common/utils/e$d;)V
    .locals 1

    const/4 v0, 0x0

    .line 26
    invoke-static {p0, v0, p1, p2}, Lcom/jecelyin/common/utils/e;->a(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Lcom/jecelyin/common/utils/e$d;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Lcom/jecelyin/common/utils/e$d;)V
    .locals 7

    const v0, 0x104000a

    .line 27
    invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v5

    const/high16 v0, 0x1040000

    invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v6

    move-object v1, p0

    move-object v2, p1

    move-object v3, p2

    move-object v4, p3

    invoke-static/range {v1 .. v6}, Lcom/jecelyin/common/utils/e;->a(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Lcom/jecelyin/common/utils/e$d;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Lcom/jecelyin/common/utils/e$d;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    .line 28
    new-instance v0, Lcom/jecelyin/common/widget/dialog/a$c;

    invoke-direct {v0, p0}, Lcom/jecelyin/common/widget/dialog/a$c;-><init>(Landroid/content/Context;)V

    .line 29
    invoke-virtual {v0, p1}, Lcom/jecelyin/common/widget/dialog/a$c;->e(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 30
    invoke-virtual {v0, p2}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 31
    invoke-virtual {v0, p4}, Lcom/jecelyin/common/widget/dialog/a$c;->d(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 32
    invoke-virtual {v0, p5}, Lcom/jecelyin/common/widget/dialog/a$c;->b(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    new-instance p0, Lcom/jecelyin/common/utils/e$c;

    invoke-direct {p0, p3}, Lcom/jecelyin/common/utils/e$c;-><init>(Lcom/jecelyin/common/utils/e$d;)V

    .line 33
    invoke-virtual {v0, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->c(Landroid/content/DialogInterface$OnClickListener;)Lcom/jecelyin/common/widget/dialog/a$c;

    new-instance p0, Lcom/jecelyin/common/utils/e$b;

    invoke-direct {p0, p3}, Lcom/jecelyin/common/utils/e$b;-><init>(Lcom/jecelyin/common/utils/e$d;)V

    .line 34
    invoke-virtual {v0, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Landroid/content/DialogInterface$OnClickListener;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 35
    invoke-virtual {v0}, Lcom/jecelyin/common/widget/dialog/a$c;->c()Lcom/jecelyin/common/widget/dialog/a;

    move-result-object p0

    const/4 p1, 0x0

    .line 36
    invoke-virtual {p0, p1}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V

    const/4 p1, 0x1

    .line 37
    invoke-virtual {p0, p1}, Landroid/app/Dialog;->setCancelable(Z)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILcom/jecelyin/common/utils/e$e;)V
    .locals 3

    .line 9
    sget v0, Lcom/jecelyin/editor/v2/k;->je_dialog_input_layout:I

    const/4 v1, 0x0

    invoke-static {p0, v0, v1}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 10
    sget v1, Lcom/jecelyin/editor/v2/j;->dialog_edit_text:I

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    const/4 v2, 0x1

    if-nez p4, :cond_0

    const/4 p4, 0x1

    .line 11
    :cond_0
    invoke-virtual {v1, p4}, Landroid/widget/EditText;->setInputType(I)V

    .line 12
    invoke-virtual {v1, p2}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V

    .line 13
    invoke-virtual {v1, p3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 14
    new-instance p2, Lcom/jecelyin/common/widget/dialog/a$c;

    invoke-direct {p2, p0}, Lcom/jecelyin/common/widget/dialog/a$c;-><init>(Landroid/content/Context;)V

    .line 15
    invoke-virtual {p2, p1}, Lcom/jecelyin/common/widget/dialog/a$c;->e(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 16
    invoke-virtual {p2, v0}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Landroid/view/View;)Lcom/jecelyin/common/widget/dialog/a$c;

    const/high16 p0, 0x1040000

    .line 17
    invoke-virtual {p2, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->b(I)Lcom/jecelyin/common/widget/dialog/a$c;

    const p0, 0x104000a

    .line 18
    invoke-virtual {p2, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->d(I)Lcom/jecelyin/common/widget/dialog/a$c;

    new-instance p0, Lcom/jecelyin/common/utils/e$a;

    invoke-direct {p0, v1, p5}, Lcom/jecelyin/common/utils/e$a;-><init>(Landroid/widget/EditText;Lcom/jecelyin/common/utils/e$e;)V

    .line 19
    invoke-virtual {p2, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->c(Landroid/content/DialogInterface$OnClickListener;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 20
    invoke-virtual {p2}, Lcom/jecelyin/common/widget/dialog/a$c;->a()Lcom/jecelyin/common/widget/dialog/a;

    move-result-object p0

    .line 21
    invoke-virtual {p0, v1}, Lcom/jecelyin/common/widget/dialog/a;->a(Landroid/widget/EditText;)V

    const/4 p1, 0x0

    .line 22
    invoke-virtual {p0, p1}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V

    .line 23
    invoke-virtual {p0, v2}, Landroid/app/Dialog;->setCancelable(Z)V

    .line 24
    invoke-virtual {p0}, Landroid/app/Dialog;->show()V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-static {p0, v0, p1}, Lcom/jecelyin/common/utils/e;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    .line 2
    instance-of v0, p0, Landroid/app/Activity;

    if-eqz v0, :cond_0

    move-object v0, p0

    check-cast v0, Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->isFinishing()Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 3
    :cond_0
    new-instance v0, Lcom/jecelyin/common/widget/dialog/a$c;

    invoke-direct {v0, p0}, Lcom/jecelyin/common/widget/dialog/a$c;-><init>(Landroid/content/Context;)V

    .line 4
    invoke-virtual {v0, p1}, Lcom/jecelyin/common/widget/dialog/a$c;->e(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 5
    invoke-virtual {v0, p2}, Lcom/jecelyin/common/widget/dialog/a$c;->a(Ljava/lang/CharSequence;)Lcom/jecelyin/common/widget/dialog/a$c;

    const p0, 0x104000a

    .line 6
    invoke-virtual {v0, p0}, Lcom/jecelyin/common/widget/dialog/a$c;->d(I)Lcom/jecelyin/common/widget/dialog/a$c;

    .line 7
    invoke-virtual {v0}, Lcom/jecelyin/common/widget/dialog/a$c;->c()Lcom/jecelyin/common/widget/dialog/a;

    return-void
.end method

.method public static b(Landroid/content/Context;I)V
    .locals 0

    .line 1
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-static {p0, p1}, Lcom/jecelyin/common/utils/e;->c(Landroid/content/Context;Ljava/lang/String;)V

    return-void
.end method

.method public static b(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    .line 2
    invoke-static {}, Lcom/jecelyin/editor/v2/b;->d()Z

    move-result p1

    if-nez p1, :cond_0

    .line 3
    sget p1, Lcom/jecelyin/editor/v2/m;->iap_service_disconnected:I

    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p0

    invoke-virtual {p0}, Landroid/widget/Toast;->show()V

    return-void

    :cond_0
    const/16 p1, 0x9

    .line 4
    invoke-static {p0, p1}, Lcom/jecelyin/editor/v2/b;->a(Landroid/content/Context;I)V

    return-void
.end method

.method public static c(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1

    .line 1
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object p0

    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p0

    invoke-virtual {p0}, Landroid/widget/Toast;->show()V

    return-void
.end method
